<?php
class User extends AppModel {
	var $name = 'User';
	var $validate = array(
		'email' => array(
			'email' => array(
				'rule' => 'email',
				'message' => '请输入有效的邮箱地址。'
			),
			'e_unique' => array(
				'rule' => array('isUnique'),
				'message' => '你输入的邮箱已经注册过了！如果你忘记了密码，可以找回密码看看。'
			)
		),
		'password' => array(
            'required' => array(
                'rule' => 'notEmpty',
                'message' => '密码不能为空。'
            ),
			'alpha' => array(
				'rule' => 'alphaNumeric',
				'message' => '密码只能由数字、字母和符号组成。'
			),
			'minlen' => array(
				'rule' => array('minlength', '6'),
				'message' => '密码太短了，最少6位。'
			)
		)
	);
}
